package com.aaa.test.contronller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @ClassName UserContronller
 * @Description TODO
 * @Aythor WYX
 * @Date 2022/11/3 17:41
 * Version 1.0
 **/
@Controller
public class UserContronller {
    @GetMapping("/user/query")
    @ResponseBody
    @PreAuthorize(value = "hasAnyAuthority('/user/query')")
    public String query(){
        return "query";
    }
    @GetMapping("/user/del")
    @ResponseBody
    @PreAuthorize(value = "hasAnyAuthority('/user/del')")
    public String del(){
        return "del";
    }
    @GetMapping("/user/add")
    @ResponseBody
    @PreAuthorize(value = "hasAnyAuthority('/user/add')")
    public String add() {
        return "add";
    }
}
